home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / nt / zkf102.zip / zk.ini < prev    next >
Text File  |  1995-01-04  |  5KB  |  108 lines

  1. // This is zk.ini, the user-modifiable initialization file for zk.
  2.  
  3. // You are assumed to already be an experienced C++ programmer.  These
  4. // comments and the documentation don't give you any C++ help, just
  5. // help with zk.  The C++ language is extended by adding a few minor
  6. // features, such as new kinds of macros.  See extend.txt for details.
  7.  
  8. // You can put C++ statements in this file, and they will be
  9. // executed at startup.  Header files are usually not needed,
  10. // because common definitions are provided by precompiled headers
  11. // supplied by the background fast-initialization process.
  12. // You can however use your own header files when you need them,
  13. // the normal way.
  14.  
  15. // C++ statements you put in this file or on the command line are
  16. // executed immediately if they are normal C++ executable statements.
  17. // There is no main(), you just input the C++ statements at the
  18. // command line prompt or in zk.ini (this file), or if you have the
  19. // pro version, you can use other input, such as zkbat script files,
  20. // which can be executed from the operating system command line
  21. // without invoking zk first, and which are explained in scripts.txt.
  22.  
  23. // While executable C++ statements are executed immediately, other
  24. // kinds of statements, such as function declarations, etc., are
  25. // stored and made available for your code to use, just as if you had
  26. // compiled them.
  27.  
  28. // In general, you can input anything at the zk command line you can 
  29. // put in zk.ini, and vice versa.  One minor difference is that some
  30. // commands which don't require a semicolon on the command line do
  31. // require one in zk.ini.  Those are the commands that take an unknown
  32. // number of arguments, and any operating system commands defined by
  33. // the cmds macro.
  34.  
  35. // The following defines the zk command, which you can use to reload
  36. // zk.ini after modifying it, without exiting from zk.  To use it, just
  37. // type zk at the zk command line.  It calls ldini(), which is a
  38. // compiled function.  The definitions you entered at the command line
  39. // will still be there unless new definitions in zk.ini override them.
  40. // Note that zk is an m1 macro, which is one of the new kinds of macros
  41. // explained in extend.txt.
  42. // Don't confuse this zk command with the one you type at the operating
  43. // system command line to invoke zk.  The effects are similar but this
  44. // one invokes a macro and that one invokes zk.exe.  You can change this
  45. // to some other name than zk if you prefer.
  46. #m1 zk ldini(); %
  47.  
  48. // The following defines zi as a command to edit zk.ini, but since you
  49. // will be using your own editor, you need to change "vi" to the name
  50. // of your editor.
  51. #m1 zi sys vi zk.ini; %
  52.  
  53. // The following defines some operating system shell commands, so
  54. // you can use these commands at the zk command line prompt.  You
  55. // can add other commands you want to use.  You should also change
  56. // "vi" to the name of your editor.  You can use the cmds macro as
  57. // many times as you want, to keep adding more commands.  For more
  58. // information about the cmds macro, see extend.txt.
  59. cmds dir cls vi copy xcopy;
  60.  
  61. // The following define qq, to quit, and sh, to shell out to cmd.exe,
  62. // which is the command shell that comes with NT.  When you quit, you
  63. // can start fresh by invoking zk again.  When you shell out, you
  64. // return to the original zk session by using the exit command.
  65. #m1 qq exitfrominterp(); %
  66. #m1 sh sys cmd; %
  67.  
  68. // Here we clear the screen and display zk's version message.
  69. // The cls command does not need a semicolon when typed at the
  70. // command line, but it does need one here in zk.ini, for reasons
  71. // explained in extend.txt.
  72. cls;
  73. version();
  74.  
  75. // The following defines the hi command, used in the message below.
  76. // See library.txt for an explanation of the msg and gsm macros.
  77. // We could use cout<<text<<endl instead of msg/gsm, but then we would
  78. // have to #include iostream.h.  The msg and gsm macros are available
  79. // with no explicit #includes, and they also provide some easy
  80. // formatting features, as explained in library.txt.  One other advantage
  81. // of msg/gsm is that the output goes to the session log, if any, in
  82. // addition to the console.  See environ.txt for details of how to get
  83. // a session log.
  84. #m1 hi(text) msg text gsm; %
  85.  
  86. hi ""
  87. hi "This message is output from zk.ini, which you can modify."
  88. hi "To modify it, you can use your own editor, which you can invoke from"
  89. hi "The zk command line.  If you haven't defined your editor in zk.ini"
  90. hi "yet, you can use \"sys vi zk.ini\", substituting the name of your"
  91. hi "editor for vi."
  92. hi ""
  93. hi "At the zk command line you can enter expressions, program statements,"
  94. hi "classes, functions, etc., like in an ordinary c++ program."
  95. hi ""
  96. hi "You can make a sophisticated desk calculator by defining functions"
  97. hi "in zk.ini and using them at the zk command line.  Unlike normal c++"
  98. hi "you don't have to explicitly request output for common expression"
  99. hi "result types.  That is, when an expression such as 2+2 is entered at"
  100. hi "the zk command line, the result is displayed automatically unless"
  101. hi "you use it as part of another expression or explicitly suppress it."
  102. hi ""
  103. hi "See zkdoc.txt for a list of documentation."
  104. hi ""
  105. hi "The command to exit from zk is qq."
  106. hi ""
  107.  
  108.